import React, { Component } from 'react';
import HOC from './HOC';

class Demo extends Component {

  showProps () {
    console.log(this.props)
  }

  render() {
    // console.log(this.props);
    return (
      <div>
        <h2>高阶组件</h2>
        <div>由HOC传递过来的props: {this.props.text}</div>
      </div>
    );
  }

}

export default HOC(Demo);
